# -*- mode: snippet -*-
# name: EnvStats::tolIntNormHalfWidth template, half width, ci width with tolerance
# key: envstats.tolIntNormHalfWidth.template
# contributor: Shuguang Sun
# --
totn <- ${1:30}
cv <- ${2:0.4}
sd <- sqrt(log(1 + $2^2))
chance <- ${3:0.7}
alpha <- ${4:0.1}
${99:hw} <- EnvStats::tolIntNormHalfWidth(
  n = totn,
  sigma.hat = sd,
  coverage = chance,
  cov.type = "content",
  conf.level = 1-alpha,
  ## method = "wald.wolfowitz"
)
$99